Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API-39286-rename-poa-pdf #18259

Merged
merged 10 commits into from
Sep 5, 2024
Merged

API-39286-rename-poa-pdf #18259

merged 10 commits into from
Sep 5, 2024

Conversation

rockwellwindsor-va
Copy link
Contributor

@rockwellwindsor-va rockwellwindsor-va commented Aug 29, 2024

Summary

  • Updates naming for v1 forms submitted via the 'PUT' (upload action).
    • Adds optional param in bd.rb to handle tracking the action being used
  • Adds test for new naming pattern

Related issue(s)

API-39286

Testing done

  • New code is covered by unit tests

Testing notes

  • Submit to v1 POST and PUT POA endpoint
  • YOU WILL NEED TO MAKE THIS UPDATE TO SEE THE FILE IN VBMS
    • In br.rb on line 108 you need to set the birls_file_num to be equal to the test users SSN.
  • Submitting to the POST endpoint (include signatures on submission) and the doc that appears in VBMS should have the doc_type extension at the end
  • Submitting to the PUT should have _representative replacing the doc type
Screenshot 2024-09-04 at 9 55 57 AM

What areas of the site does it impact?

modified:   modules/claims_api/app/sidekiq/claims_api/v1/poa_form_builder_job.rb
modified:   modules/claims_api/lib/bd/bd.rb
modified:   modules/claims_api/spec/lib/claims_api/bd_spec.rb

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

* Updates naming for v1 2122 POA forms.
	* Adds optional param in bd.rb to handle tracking api version being used
* Adds test for new naming pattern
	modified:   modules/claims_api/app/sidekiq/claims_api/v1/poa_form_builder_job.rb
	modified:   modules/claims_api/lib/bd/bd.rb
	modified:   modules/claims_api/spec/lib/claims_api/bd_spec.rb
modules/claims_api/lib/bd/bd.rb Outdated Show resolved Hide resolved
modules/claims_api/lib/bd/bd.rb Outdated Show resolved Hide resolved
modules/claims_api/lib/bd/bd.rb Outdated Show resolved Hide resolved
@va-vfs-bot va-vfs-bot temporarily deployed to API-39286-rename-poa-pdf/main/main August 29, 2024 20:08 Inactive
@rockwellwindsor-va rockwellwindsor-va added the claimsApi modules/claims_api label Aug 29, 2024
@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review August 29, 2024 22:22
@rockwellwindsor-va rockwellwindsor-va requested a review from a team as a code owner August 29, 2024 22:22
@rockwellwindsor-va rockwellwindsor-va marked this pull request as draft August 30, 2024 19:13
…to track when the job is triggered from that spot
modules/claims_api/lib/bd/bd.rb Outdated Show resolved Hide resolved
modules/claims_api/lib/bd/bd.rb Show resolved Hide resolved
modules/claims_api/lib/bd/bd.rb Show resolved Hide resolved
modules/claims_api/lib/bd/bd.rb Show resolved Hide resolved
@va-vfs-bot va-vfs-bot temporarily deployed to API-39286-rename-poa-pdf/main/main August 30, 2024 23:34 Inactive
@@ -12,14 +12,14 @@ class PoaVBMSUploadJob < ClaimsApi::ServiceBase
# If successfully uploaded, it queues a job to update the POA code in BGS, as well.
#
# @param power_of_attorney_id [String] Unique identifier of the submitted POA
def perform(power_of_attorney_id)
def perform(power_of_attorney_id, action: 'post')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has approx 12 statements - TooManyStatements

it 'the fileName ends in representative.pdf' do
expect(json_body['data']['fileName']).to end_with('_representative.pdf')
end
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure this second test is needed since this scenario shouldn't happen. Wanted to include it just to be safe. If anyone feels strongly about removing it I am open to that but wanted to error on the side of playing it safe and making sure this would be handled.

@rockwellwindsor-va rockwellwindsor-va marked this pull request as ready for review September 4, 2024 15:29
@va-vfs-bot va-vfs-bot temporarily deployed to API-39286-rename-poa-pdf/main/main September 4, 2024 17:56 Inactive
tycol7
tycol7 previously approved these changes Sep 4, 2024
Copy link
Contributor

@tycol7 tycol7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines 158 to 159
context 'the doc type is 21-22' do
let(:pdf_path) { 'modules/claims_api/spec/fixtures/21-22A/signed_filled_final.pdf' }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be

Suggested change
context 'the doc type is 21-22' do
let(:pdf_path) { 'modules/claims_api/spec/fixtures/21-22A/signed_filled_final.pdf' }
context 'the doc type is 21-22' do
let(:pdf_path) { 'modules/claims_api/spec/fixtures/21-22/signed_filled_final.pdf' }

for completenessʼ sake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, nice catch, committed it

@rockwellwindsor-va rockwellwindsor-va requested a review from a team September 5, 2024 11:46
@rockwellwindsor-va rockwellwindsor-va merged commit 142e25e into master Sep 5, 2024
22 of 23 checks passed
@rockwellwindsor-va rockwellwindsor-va deleted the API-39286-rename-poa-pdf branch September 5, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants